"""init

Revision ID: 1babe699a098
Revises: 7ea040a68be3
Create Date: 2024-12-09 23:06:01.714117

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql

# revision identifiers, used by Alembic.
revision: str = '1babe699a098'
down_revision: Union[str, None] = '7ea040a68be3'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('users', 'username',
               existing_type=mysql.VARCHAR(length=50),
               nullable=True)
    op.alter_column('users', 'email',
               existing_type=mysql.VARCHAR(length=100),
               nullable=True)
    op.alter_column('users', 'password',
               existing_type=mysql.VARCHAR(length=100),
               nullable=True)
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('users', 'password',
               existing_type=mysql.VARCHAR(length=100),
               nullable=False)
    op.alter_column('users', 'email',
               existing_type=mysql.VARCHAR(length=100),
               nullable=False)
    op.alter_column('users', 'username',
               existing_type=mysql.VARCHAR(length=50),
               nullable=False)
    # ### end Alembic commands ###
